home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / ml.fin < prev    next >
Text File  |  1991-04-12  |  3KB  |  83 lines

  1. Article 1011 of comp.sys.handhelds:
  2. Path: en.ecn.purdue.edu!noose.ecn.purdue.edu!samsung!uunet!microsoft!alonzo
  3. From: alonzo@microsoft.UUCP (Alonzo GARIEPY)
  4. Newsgroups: comp.sys.handhelds
  5. Subject: uuencoded FIND and syseval CFIND for 48
  6. Message-ID: <56658@microsoft.UUCP>
  7. Date: 17 Aug 90 00:48:49 GMT
  8. Reply-To: alonzo@microsoft.UUCP (Alonzo GARIEPY)
  9. Organization: Microsoft Corp., Redmond WA
  10. Lines: 69
  11.  
  12. Here is a uuencoded version of my FIND program.  Using machine language,
  13. it searches the memory of the calculator very quickly for a sequence of
  14. nibbles that you supply.  If you wanted to look for 33D4E35 (low to high
  15. memory) starting at address #20000, the arguments to FIND would be:
  16.  
  17.     2: #53E4D336
  18.     1: #20000
  19.  
  20. That is, the nibbles you specify must be in reverse order (high to low
  21. memory) followed by the number of nibbles less one.  Here we are looking
  22. for 7 nibbles (33D4E35) so we put 6 at the end of the binary integer.
  23.  
  24. The first address FIND checks will actually be #20001.
  25. When find returns, it will display the address where the pattern was
  26. found or it will have searched all memory and returned to #20000.
  27. When there are several instances of the pattern in memory, you can just
  28. keep executing FIND and it will display the successive addresses.
  29. You can easily automate this process in another program.
  30.  
  31. begin 600 find
  32. M2%!(4#0X+4&=+>!A(\FB<K8:_L4QDP(!`````````L7%T;L?3BI0`0``````
  33. M``````GHT;L?Q<7!W`*1`!`C(:#/(1%'01=#81IEIU^!$&443$$3`V$9)#$0
  34. M)8?0GP$E8;!/2U;Q"/S0!)X!V_L4!O4>-#$2ED$@$!+Z'`(Q$B1AA("<8R,K
  35. ",0#0
  36. `
  37. end
  38.  
  39. FIND was particularly useful for determining the location on the 48
  40. of routines I had discovered on the 28.  Most of this code was not
  41. rewritten so I just searched for a sequence of machine code instructions.
  42. Since many addresses have changed on the 48, I had to be careful not to
  43. use sequences that contained an address.  I have also used this technique
  44. to map Eric Toonen's Syseval map onto the 48.  Sometimes I had to disassemble
  45. the code first so I could see embedded addresses.
  46.  
  47. Rick Grevelle has done a great deal of work in exploring the HP 28 and
  48. as part of his researches into the 48, he has created the following program
  49. for generating the FIND program.  This will prove useful to those of you
  50. without serial communications to your 48 or access to the uudecode program.
  51. I'll see if I can get Rick to put together a list of 48 Syseval addresses.
  52.  
  53. From: Rick Grevelle <uunet!tamuts.tamu.edu!n242df>
  54. Subject: HP 48 version of CFIND
  55.  
  56. CFIND [C44B]
  57.  
  58. \<<
  59.     \<<  RCWS  20  STWS  SWAP  #0h
  60.          OR  SWAP  STWS  A  1  +  
  61.     \>>  10
  62.           #1471121CFA021231h
  63.           #15FA7651A6143174h
  64.           #10313414C1465108h
  65.           #FD08725103124196h
  66.           #1564B4FB06125019h
  67.           #BDB019E04D0FC08Fh
  68.           #61231341EF50614Fh
  69.           #1021CFA121020419h
  70.           #C80846124123h
  71.      48  STWS  #0h  OR  64  STWS
  72.      1  8  START
  73.           #5193h   SYSEVAL
  74.            NEXT  #2DCCh
  75.           #5A03h   SYSEVAL
  76.           #5ACCh   SYSEVAL
  77.           #1D524h  SYSEVAL
  78.           #54AFh   SYSEVAL
  79.           #5445h   SYSEVAL
  80. \>>
  81.  
  82.  
  83.